<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>修改商品信息</title>
		<style type="text/css">
			.error {
				color:red;
			} 
		</style>
	</head>
<body>
	<form:form action="${pageContext.request.contextPath }/items/save.action" modelAttribute="items" method="post">
		<form:hidden path="id" />修改商品信息：
		<table style="width: 100%" border=1>
			<tr>
				<td>商品名称</td>
				<td><form:input path="name"/><form:errors path="name" cssClass="error"></form:errors></td>
			</tr>
			<tr>
				<td>商品价格</td>
				<td><form:input path="price"/></td>
			</tr>
			<tr>
				<td>商品生产日期</td>
				<td><form:input path="createtime"/><form:errors path="createtime" cssClass="error"></form:errors></td>
			</tr>
			<%-- <tr>
				<td>商品图片</td>
				<td>
					<c:if test="${item.pic !=null}">
						<img src="/pic/${item.pic}" width=100 height=100 /><br />
					</c:if> <input type="file" name="pic" />
				</td>
			</tr> --%>
			<tr>
				<td>商品简介</td>
				<td><form:textarea path="detail" cols="30" rows="3"/></td>
			</tr>
			<tr>
				<td colspan="2" align="center"><input type="submit" value="提交" /></td>
			</tr>
		</table>
	</form:form>
</body>
</html>